{{template "header.html" .}}
<div id="form-result-message">
    <div class="message success hide">链接已更新</div>
    <div class="message error hide">链接更新失败：<span></span></div>
</div>
<form id="link-add-form" class="form container" action="/admin/links/edit/{{.Link.id}}/" method="post">
    <div id="link-add-form-header">
        <h1 class="h1">更新友链</h1>
    </div>
    <div id="link-add-form-main">
        <p class="item">
            <label for="link-add-name">名称</label>
            <input id="link-add-name" class="ipt" type="text" name="title" required="required" value="{{.Link.title}}"/>
        </p>
        <p class="item">
            <label for="link-add-url">URL</label>
            <input id="link-add-url" class="ipt" type="url" name="url" required="required" value="{{.Link.url}}"/>
        </p>
        <p class="item clear">
            <label for="link-add-desc" class="left">描述</label>
            <textarea class="ipt left" name="desc" id="link-add-desc">{{.Link.desc}}</textarea>
        </p>
        <p class="item submit">
            <button class="btn save" id="link-add-submit" type="submit">保存链接</button>
        </p>
        <p class="item"><label></label>&nbsp;返回：<a href="/admin/links"><strong>链接列表</strong></a></p>
    </div>
</form>
<script type="text/javascript">
    $(document).ready(function () {
        ajaxForm("#link-add-form");
    });
</script>
</body>
</html>